//
// Created by Asus on 2025/5/31.
//

#include <iostream>
using namespace std;

void demo01() {
    int score = 0;
    cout << "请输入一个分数：" << endl;
    cin >> score;
    cout << "您输入的分数为： " << score << endl;

    //if语句
    //注意事项，在if判断语句后面，不要加分号
    if (score > 600)
    {
        cout << "我考上了一本大学！！！" << endl;
    }
}

void printfunc(int num) {
    cout << "num:" << num << endl;
}

void demo02() {
    int a = 10;
    int b = 20;
    int c = 0;
    c = a > b ? a : b;
    true ? printfunc(a) : printfunc(b);
    cout << "c:" << c << endl;
    (a > b ? a:b) = 100;
    cout << "c:" << c << endl;
    cout << "a:" << a << endl;
    cout << "b:" << b << endl;
}

void demo03() {
    int score = 0;
    cout << "请输入分数：" << endl;
    cin >> score;
    switch (score) {
        case 10:
        case 9:
            cout << "经典" << endl;
            break;
        case 8:
            cout << "非常好" << endl;
            break;
        case 7:
        case 6:
            cout << "一般" << endl;
            break;
        default:
            cout << "烂片" << endl;
            break;
    }
}

void demo04() {
    cout << "1" << endl;
    goto FLAG;
    cout << "2" << endl;
    cout << "3" << endl;
    cout << "4" << endl;
    FLAG:
    cout << "5" << endl;
}

int main(char *argv[]) {
    // demo01();
    // demo02();
    // demo03();
    demo04();
    return 0;
}
